﻿//JumbotCms_4.1 Final
using System;
using System.Data;
using System.Web;
using JumbotCms.Common;
using JumbotCms.API;

namespace JumbotCms.WebFile.Plus
{
    public partial class _javascript : JumbotCms.API.FrontHtml
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string _code = q("code");
            if (_code.Length != 64)
                Response.Write("参数有误");
            string strXmlFile = HttpContext.Current.Server.MapPath("~/_data/config/javascript.config");
            Jumbot.DataOper.XmlControl XmlTool = new Jumbot.DataOper.XmlControl(strXmlFile);
            int _ChannelId = Str2Int(XmlTool.GetText("Lis/Li[Code=\"" + _code + "\"]/ChannelId"));
            int _ClassId = Str2Int(XmlTool.GetText("Lis/Li[Code=\"" + _code + "\"]/ClassId"));
            int _SelectNumber = Str2Int(XmlTool.GetText("Lis/Li[Code=\"" + _code + "\"]/SelectNumber"));
            string _JumbotLiCode = XmlTool.GetText("Lis/Li[Code=\"" + _code + "\"]/JumbotLiCode");
            int _TitleLen = Str2Int(XmlTool.GetText("Lis/Li[Code=\"" + _code + "\"]/TitleLen"));
            XmlTool.Dispose();
            string[] _param = (_ChannelId + "," + _ClassId + "," + _SelectNumber + "," + _JumbotLiCode + "," + _TitleLen).Split(',');
            TemplateEngine te = new TemplateEngine(doh, "0");
            string fileStr = te.ReplaceJavascriptTag(_param);
            Response.Write(Jumbot.Common.Strings.Html2Js(fileStr));
        }
    }
}
